/*
*	(*^。^*) TFrameWork License (*^。^*)
*/

/*
 *  Title :  
 *          
 *  Description :  
 *          
 *          
 *  Date : 
 *
 *  Author : DengPing
 *
 *  Modify : 
 */

using System.Diagnostics;

namespace TFrameWork.Module.ActionEditor
{
    public interface IActionEditorLog
    {
        void _Log(string log);

        void _Warning(string log);

        void _Error(string log);
    }

    public class ActionEditorLog : IActionEditorLog
    {
        private static IActionEditorLog _log = new ActionEditorLog();


        public void SetLog(IActionEditorLog log)
        {
            _log = log;
        }

        [Conditional("OPEN_ACTION_EDITOR_LOG")]
        public static void Log(string log)
        {
            _log._Log(log);
        }

        [Conditional("OPEN_ACTION_EDITOR_LOG")]
        public static void Warning(string log)
        {
            _log._Warning(log);
        }

        public static void Error(string log)
        {
            _log._Error(log);
        }

        public void _Log(string log)
        {
            UnityEngine.Debug.Log(log);
        }

        public void _Warning(string log)
        {
            UnityEngine.Debug.LogWarning(log);
        }

        public void _Error(string log)
        {
            UnityEngine.Debug.LogError(log);
        }
    }
}
